﻿namespace HEFramework
{
    public static class GameObjectComponentSystem
    {
        [EntitySystem]
        public class GameObjectComponentAwakeSystem : AwakeSystem<GameObjectComponent>
        {
            protected override void Awake(GameObjectComponent _self)
            {
            }
        }

        [EntitySystem]
        public class GameObjectComponentDestroySystem : DestroySystem<GameObjectComponent>
        {
            protected override void Destroy(GameObjectComponent _self)
            {
                if (_self.GameObject != null)
                {
                    UnityEngine.Object.Destroy(_self.GameObject);
                }
            }
        }
    }
}